<template>
  <div>
    <el-button type="primary" @click="handleBtnClick">点我弹框</el-button>
    <MyElDialog
        title="测试弹框"
        :show="dialogShow"
        @close-dlg="handleDlgClose"
        ref="mydlg">
      <template #content>
        <div>
          <MyForm />
        </div>
      </template>
    </MyElDialog>
  </div>
</template>

<script>
import MyElDialog from "@/components/dialog2/MyElDialog";
import MyForm from "@/components/form/MyForm";
export default {
  name: "ElDialogTest",
  components: {
    MyForm,
    MyElDialog
  },
  data() {
    return {
      dialogShow: false,
    }
  },
  methods: {
    handleBtnClick() {
      this.dialogShow = true;
      this.$refs.mydlg.updateVisible(this.dialogShow);
    },

    handleDlgClose() {
      this.dialogShow = false;
    }


  }
}
</script>

<style scoped>

</style>